using System;
using System.ServiceModel;
using RPGOnline.Remoting.Entities;

namespace RPGOnline.Remoting
{
    [ServiceContract(CallbackContract = typeof(IChatManager), SessionMode = SessionMode.Required)]
    public interface IChatManager
    {
        [OperationContract(IsOneWay = true)]
        void RegisterUser(User user);

        [OperationContract(IsOneWay = true)]
        void UnregisterUser(User user);

        [OperationContract(IsOneWay = true)]
        void SendMessage(Guid chatGroupId, User user, string message);

        [OperationContract(IsOneWay = true)]
        void UserAlreadyRegistered(User user, Guid groupId);

        [OperationContract(IsOneWay = true)]
        void UserRolled(User user, RollResult rollResult);

        [OperationContract(IsOneWay = true)]
        void UserInfoChanged(User user);

        [OperationContract(IsOneWay = true)]
        void SendPrivateMessage(User user, User destinationUser, string message);

        [OperationContract(IsOneWay = true)]
        void SendGroupMessage(User user, Guid groupId, string message);

        [OperationContract(IsOneWay = true)]
        void AddGroup(ChatGroup chatGroup);

        [OperationContract(IsOneWay = true)]
        void MoveUserToGroup(User user, Guid groupId);

        [OperationContract(IsOneWay = true)]
        void RequestSessionUpdate();

        [OperationContract(IsOneWay = true)]
        void SessionUpdate(SessionContext sessionContext);
    }
}